<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>gamvas.Image</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.51 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="gamvas.Image"></a>gamvas.<wbr>Image</h1><div class=CBody><h4 class=CHeading>Description</h4><p>A plain image with methods to move, rotate and zoom.</p><p>Use this if you need performance and are sure that the image is never needed as logic or physics element, otherwise use <a href="gamvas-actor-js.html#gamvas.Actor" class=LClass id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">gamvas.Actor</a></p><h4 class=CHeading>Constructur</h4><p>new gamvas.Image(file, x, y, cx, cy);</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>file</td><td class=CDLDescription>a JavaScript Image object (see <a href="gamvas-resource-js.html#gamvas.Resource" class=LClass id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')">gamvas.Resource</a>)</td></tr><tr><td class=CDLEntry>x/y</td><td class=CDLDescription>the position of the image (optional)</td></tr><tr><td class=CDLEntry>cx/cy</td><td class=CDLDescription>the center of rotation of the image (optional)</td></tr></table><h4 class=CHeading>See</h4><p><a href="gamvas-actor-js.html#gamvas.Actor" class=LClass id=link16 onMouseOver="ShowTip(event, 'tt14', 'link16')" onMouseOut="HideTip('tt14')">gamvas.Actor</a></p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#gamvas.Image" >gamvas.<wbr>Image</a></td><td class=SDescription>A plain image with methods to move, rotate and zoom.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#gamvas.Image.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Image.setRotation" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">setRotation</a></td><td class=SDescription>Set certain rotation of the image in radians</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.Image.rotate" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">rotate</a></td><td class=SDescription>Rotate the image</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Image.setPosition" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">setPosition</a></td><td class=SDescription>Set the position of a image</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.Image.move" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">move</a></td><td class=SDescription>Move the image</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Image.setScale" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">setScale</a></td><td class=SDescription>Set a certain scale factor</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.Image.scale" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">scale</a></td><td class=SDescription>Scale the image</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Image.setScaleXY" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">setScaleXY</a></td><td class=SDescription>Set a different scale for x and y axis</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.Image.setCenter" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">setCenter</a></td><td class=SDescription>Set the center for an Image. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Image.setFile" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">setFile</a></td><td class=SDescription>Sets the image</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.Image.draw" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">draw</a></td><td class=SDescription>draws the image, using its position, rotation and scale information</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Image.setClipRect" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">setClipRect</a></td><td class=SDescription>Sets the clipping rectangle of a image</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.Image.getClipRect" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">getClipRect</a></td><td class=SDescription>Gets the clipping rectangle of a image as <a href="gamvas-rect-js.html#gamvas.Rect" class=LClass id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">gamvas.Rect</a></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.setRotation"></a>setRotation</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setRotation = function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set certain rotation of the image in radians</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the rotation in radians</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.Image.rotate" class=LFunction id=link17 onMouseOver="ShowTip(event, 'tt2', 'link17')" onMouseOut="HideTip('tt2')">gamvas.Image.rotate</a> <a href="http://en.wikipedia.org/wiki/Radians" class=LURL target=_top>http://en.wikipedia.org/wiki/Radians</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.rotate"></a>rotate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.rotate = function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Rotate the image</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>the amount to rotate the image in radians</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.Image.setRotation" class=LFunction id=link18 onMouseOver="ShowTip(event, 'tt1', 'link18')" onMouseOut="HideTip('tt1')">gamvas.Image.setRotation</a> <a href="http://en.wikipedia.org/wiki/Radians" class=LURL target=_top>http://en.wikipedia.org/wiki/Radians</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.setPosition"></a>setPosition</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setPosition = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the position of a image</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>x/y</td><td class=CDLDescription>the position of the image in pixels</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.Image.move" class=LFunction id=link19 onMouseOver="ShowTip(event, 'tt4', 'link19')" onMouseOut="HideTip('tt4')">gamvas.Image.move</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.move"></a>move</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.move = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Move the image</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>x/y</td><td class=CDLDescription>the pixels to move the image</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.Image.setPosition" class=LFunction id=link20 onMouseOver="ShowTip(event, 'tt3', 'link20')" onMouseOut="HideTip('tt3')">gamvas.Image.setPosition</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.setScale"></a>setScale</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setScale = function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set a certain scale factor</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>s</td><td class=CDLDescription>the scale value (1 = no scale, &lt; 1 = smaller, &gt; 1 = bigger)</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.Image.scale" class=LFunction id=link21 onMouseOver="ShowTip(event, 'tt6', 'link21')" onMouseOut="HideTip('tt6')">gamvas.Image.scale</a> <a href="#gamvas.Image.setScaleXY" class=LFunction id=link22 onMouseOver="ShowTip(event, 'tt7', 'link22')" onMouseOut="HideTip('tt7')">gamvas.Image.setScaleXY</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.scale"></a>scale</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.scale = function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Scale the image</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>s</td><td class=CDLDescription>the scale factor (&lt; 0 = shrink, &gt; 0 = enlarge)</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.Image.setScale" class=LFunction id=link23 onMouseOver="ShowTip(event, 'tt5', 'link23')" onMouseOut="HideTip('tt5')">gamvas.Image.setScale</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.setScaleXY"></a>setScaleXY</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setScaleXY = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set a different scale for x and y axis</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>x</td><td class=CDLDescription>the scale of the x axis (1 = no scale, &lt; 1 = smaller, &gt; 1 = bigger)</td></tr><tr><td class=CDLEntry>y</td><td class=CDLDescription>the scale of the y axis (1 = no scale, &lt; 1 = smaller, &gt; 1 = bigger)</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.Image.setScale" class=LFunction id=link24 onMouseOver="ShowTip(event, 'tt5', 'link24')" onMouseOut="HideTip('tt5')">gamvas.Image.setScale</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.setCenter"></a>setCenter</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setCenter = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the center for an Image.&nbsp; If you have a round object for example with a size of 64 by 64 pixels and you want to rotate it around the center, you would use myObject.setCenter(32, 32);</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>x/y</td><td class=CDLDescription>the center, as seen of the upper left corner of the object</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.setFile"></a>setFile</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setFile = function(</td><td class="PParameter  prettyprint " nowrap>f</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Sets the image</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>image</td><td class=CDLDescription>a JavaScript Image object</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.draw"></a>draw</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.draw = function()</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>draws the image, using its position, rotation and scale information</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.setClipRect"></a>setClipRect</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setClipRect = function(</td><td class="PParameter  prettyprint " nowrap>rx,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>w,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>h</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the clipping rectangle of a image</p><p>A clipping rectangle defines which portion of the image will be drawn.&nbsp; It has to be inside the image and is specified by its top left corner and a width and height.</p><p>By default, a clipping rectange of x/y = 0/0 and width/height = image width and height is used</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>rx</td><td class=CDLDescription>either a <a href="gamvas-rect-js.html#gamvas.Rect" class=LClass id=link25 onMouseOver="ShowTip(event, 'tt13', 'link25')" onMouseOut="HideTip('tt13')">gamvas.Rect</a> object or the x coordinate of the upper left corner</td></tr><tr><td class=CDLEntry>y</td><td class=CDLDescription>the y coordinate of the uppder left corner (if rx is not a <a href="gamvas-rect-js.html#gamvas.Rect" class=LClass id=link26 onMouseOver="ShowTip(event, 'tt13', 'link26')" onMouseOut="HideTip('tt13')">gamvas.Rect</a> object)</td></tr><tr><td class=CDLEntry>w</td><td class=CDLDescription>the width of the clipping rectangle (if rx is not a <a href="gamvas-rect-js.html#gamvas.Rect" class=LClass id=link27 onMouseOver="ShowTip(event, 'tt13', 'link27')" onMouseOut="HideTip('tt13')">gamvas.Rect</a> object)</td></tr><tr><td class=CDLEntry>h</td><td class=CDLDescription>the height of the clipping rectangle (if rx is not a <a href="gamvas-rect-js.html#gamvas.Rect" class=LClass id=link28 onMouseOver="ShowTip(event, 'tt13', 'link28')" onMouseOut="HideTip('tt13')">gamvas.Rect</a> object)</td></tr></table><h4 class=CHeading>See</h4><p><a href="#gamvas.Image.getClipRect" class=LFunction id=link29 onMouseOver="ShowTip(event, 'tt12', 'link29')" onMouseOut="HideTip('tt12')">gamvas.Image.getClipRect</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Image.getClipRect"></a>getClipRect</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.getClipRect = function()</td></tr></table></blockquote><p>Gets the clipping rectangle of a image as <a href="gamvas-rect-js.html#gamvas.Rect" class=LClass id=link30 onMouseOver="ShowTip(event, 'tt13', 'link30')" onMouseOut="HideTip('tt13')">gamvas.Rect</a></p><h4 class=CHeading>See</h4><p><a href="#gamvas.Image.setClipRect" class=LFunction id=link31 onMouseOver="ShowTip(event, 'tt11', 'link31')" onMouseOut="HideTip('tt11')">gamvas.Image.setClipRect</a> <a href="gamvas-rect-js.html#gamvas.Rect" class=LClass id=link32 onMouseOver="ShowTip(event, 'tt13', 'link32')" onMouseOut="HideTip('tt13')">gamvas.Rect</a></p></div></div></div>

</div><!--Content-->


<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MEntry><div class=MFile><a href="gamvas-base-js.html">gamvas</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-actor-js.html">gamvas.<wbr>Actor</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-actorstate-js.html">gamvas.<wbr>ActorState</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-animation-js.html">gamvas.<wbr>Animation</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-astar-js.html">gamvas.<wbr>AStar</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-astargrid-js.html">gamvas.<wbr>AStarGrid</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-astargridnode-js.html">gamvas.<wbr>AStarGridNode</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-astarmap-js.html">gamvas.<wbr>AStarMap</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-astarnode-js.html">gamvas.<wbr>AStarNode</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-camera-js.html">gamvas.<wbr>Camera</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-class-js.html">gamvas.<wbr>Class</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-config-js.html">gamvas.<wbr>config</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-dom-js.html">gamvas.dom</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-event-js.html">gamvas.<wbr>event</a></div></div><div class=MEntry><div class=MFile id=MSelected>gamvas.<wbr>Image</div></div><div class=MEntry><div class=MFile><a href="gamvas-key-js.html">gamvas.key</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-math-js.html">gamvas.math</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-mouse-js.html">gamvas.<wbr>mouse</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-particleemitter-js.html">gamvas.<wbr>ParticleEmitter</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-physics-js.html">gamvas.<wbr>physics</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-physics-userdata-js.html">gamvas.<wbr>physics.<wbr>UserData</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-rect-js.html">gamvas.Rect</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-resource-js.html">gamvas.<wbr>Resource</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-screen-js.html">gamvas.<wbr>screen</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-sound-js.html">gamvas.<wbr>Sound</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-state-js.html">gamvas.<wbr>state</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-state-state-js.html">gamvas.<wbr>State</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-timer-js.html">gamvas.<wbr>timer</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-vector2d-js.html">gamvas.<wbr>Vector2D</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Macros.html">Macros</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Functions">Functions</option><option value="Macros">Macros</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
HideAllBut([], 2);// --></script></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setRotation = function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set certain rotation of the image in radians</div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.rotate = function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Rotate the image</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setPosition = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the position of a image</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.move = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Move the image</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setScale = function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set a certain scale factor</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.scale = function(</td><td class="PParameter  prettyprint " nowrap>s</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Scale the image</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setScaleXY = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set a different scale for x and y axis</div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setCenter = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the center for an Image. </div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setFile = function(</td><td class="PParameter  prettyprint " nowrap>f</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Sets the image</div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.draw = function()</td></tr></table></blockquote>draws the image, using its position, rotation and scale information</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>this.setClipRect = function(</td><td class="PParameter  prettyprint " nowrap>rx,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>w,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>h</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Sets the clipping rectangle of a image</div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.getClipRect = function()</td></tr></table></blockquote>Gets the clipping rectangle of a image as gamvas.Rect</div></div><div class=CToolTip id="tt13"><div class=CClass>Holds position and width information of a rectangle</div></div><div class=CToolTip id="tt14"><div class=CClass>The actor class is the most important class in gamvas. </div></div><div class=CToolTip id="tt15"><div class=CClass>Class for resource handling, aka loading images and other game data</div></div><!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>